<template>
  <div>
    <div class="box_title">合作物流</div>
    <div class="box_nav">
      <span>{{heads}}</span>
      <img src="../../assets/images/200812.png" alt>
      <img src="../../assets/取消.png" alt @click="quxiao()">
    </div>
   
     
      <div class="box_msg" v-for="ins in list" :key="ins.id">
      <span>{{ins.name}}</span>
      <router-link to @click.native="wuliu(ins.name)">设为合作物流</router-link>
    </div>

    <div class="bombtn">
      <router-link to @click.native="pontt()">保存</router-link>
    </div> 
  </div>
</template>

<script>
export default {
  components: {

  },
  data() {
    return {
      orderid:'',
      heads:'请选择快递公司',
      list:[
          {name:'天天快递',id:1},
          {name:'圆通快递',id:2},
          {name:'顺丰快递',id:3},
          {name:'EMS快递',id:4},
          {name:'韵达快递',id:5},
          {name:'申通快递',id:6},
          {name:'中通快递',id:7},
          {name:'国通快递',id:8},
          {name:'EMS经济快递',id:9},
      ]
    }
  },
  mounted() {
    this.info();
  },
  methods: {
    pontt(){
      // console.log(8888)
      console.log(this.orderid,this.heads,)
      let url = this.APIURL_PREFIX + '/api/wap/companyUpdate';
        this.$http.put(url,$.param({defaultLogistics:this.heads})).then((res) => {
         console.log(res)
         if(res.data.code==0){
           this.$router.push({ path: 'indent_fahuo',query:{orderId:this.orderid}})
         }
        })
       
    },
    wuliu(t){
        console.log(t)
        this.heads=t
    },
    quxiao(){
       this.heads=''
    },

    info(){
        this.orderid=this.$route.query.orderid
        console.log(this.orderid)
    }
  }
};
</script>

<style scoped>
@import "../../assets/personal/css/me_morenwl.css";
</style>

